<?php
namespace Home\Controller;
use Think\Controller;
class SelectionController extends Controller {
    public function index(){
        //筛选页
        $username = cookie('username');
        $this->assign('username',$username);
        $pro = M('Pro');
        $id=1;
        $res=$pro->join('imooc_cate as a on a.id=imooc_pro.cId','left')
            ->where($id)->select();
        $this->assign("food",$res);

        $sj = $pro->field("mPrice,pDesc,pName,pImg,iPrice")->select();
        $this->assign('sj',$sj);
        $this->display();
    }
}